package cn.bone.web.controller;

import java.util.*;

public class DreamAsphyxia {

    public static void main(String... args){
        go();
    }


    public static void go(){
        int[] red = new int[33];
        int[] blue = new int[16];

        for(int i=0;i<33;i++){
            red[i] = i+1;
        }
        for(int i=0;i<16;i++){
            blue[i] = i+1;
        }

        Random random = new Random();
        //red
        Set<Integer> redSet = new HashSet<>();
        while(true){
            int index = random.nextInt(red.length);
            redSet.add(red[index]);
            if(redSet.size()==6){
                break;
            }
        }

        List<Integer> list = new ArrayList<>(redSet);
        list.sort((o1,o2)->{
            return o1.compareTo(o2);
        });

        //blue
        Set<Integer> blueSet = new HashSet<>();
        while(true){
            int index = random.nextInt(blue.length);
            blueSet.add(blue[index]);
            if(blueSet.size()==1){
                break;
            }
        }

        System.out.println(Arrays.toString(list.toArray()));
        System.out.println(Arrays.toString(blueSet.toArray()));
    }
}